package com.sckj.springboot.controller;

import com.sckj.springboot.config.MicroServiceUrl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@RestController
@RequestMapping("/url")
public class TestController {
    private static final Logger LOGGER = LoggerFactory.getLogger(TestController.class);
    @Resource
    private MicroServiceUrl microServiceUrl;

    @RequestMapping("/config")
    public String testConfig(){
        LOGGER.info("========获取订单的服务地址为：{}",microServiceUrl.getOrderUrl());
        LOGGER.info("========获取用户的服务地址为：{}",microServiceUrl.getUserUrl());
        LOGGER.info("========获取购物车的服务地址为：{}",microServiceUrl.getShoppingUrl());
        return "success";
    }
}
